//
// Created by maqz on 2018/4/2.
// Copyright (c) 2018 毛毛驴. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <WebKit/WebKit.h>

/**
    Base web view controller
 */
@interface LKBoTongFeedbackBaseWebViewController : UIViewController

@property (strong, nonatomic) WKWebView *webView;
@property (strong, nonatomic) UIProgressView *progressView;
// 存放所有 message 字典，key: message.name  value: message.body
@property (strong, nonatomic) NSMutableDictionary *scriptMessages;

// 加载 Web view
- (void)loadWebViewWithURL:(NSString *)url;

// 调用 Script 方法
- (void)evaluateJavaScript:(NSString *)javaScriptString completionHandler:(void (^ _Nullable)(_Nullable id, NSError * _Nullable error))completionHandler;

// 注册 Script message handler
- (void)addScriptMessageHandlerWithName:(NSString *)name;

// Script message
- (void)scriptMessage:(WKScriptMessage *)message;

// 用于 iOS 11 以下 因为修改navigationBar.translucent 导致subView偏移时调用
- (void)updateSubViewsTopConstrint:(CGFloat)top API_DEPRECATED("Please use below iOS 11.0",ios(8.0, 11.0));
@end
